# 数据加载和索引
import pandas as pd
import numpy as np

# 读取文件
data = pd.read_csv('data.csv')
print(type(data))
print(data)

# 读取数据
x = data.loc[:,'x']
y = data.loc[:,'y']
print(x)
print(type(x))

# 增加筛选
z = data.loc[:,'x'][y>50]
print(z)

# 转成np.array
data_array = np.array(data)
print(data_array)

# 存储为本地文件
data_new = data + 10
print(data_new.head())
data_new.to_csv('data_new.csv')